package jf.closure;

/**
 * @author ivanalx
 * @date 12.05.2009 15:31:49
 */
public class ClosureUtil {
	private ClosureUtil() {
	}

	public static Runnable runnable(final F<?> f) {
		return new Runnable() {
			public void run() {
				f.apply();
			}
		};
	}

	public static <P> Runnable runnable(final F1<P, ?> f, final P p) {
		return new Runnable() {
			public void run() {
				f.apply(p);
			}
		};
	}

}
